﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MemberBlogList.ascx.cs" Inherits="SocialFront.Web.usercontrols.Blog.MemberBlogList" %>
<%@ Import Namespace="SocialFront.Entities"%>

<%@ Register src="../Shared/TagsList.ascx" tagname="TagsList" tagprefix="sf" %>
<%--<%@ Register src="../Shared/SocialButtons.ascx" tagname="SocialButtons" tagprefix="sf" %>--%>

<asp:ListView ID="lvBlogs" runat="server" OnPagePropertiesChanging="lvBlogs_PagePropertiesChanging">

    <LayoutTemplate>
        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
    </LayoutTemplate>

    <ItemTemplate>
        <h3>
          <a href="<%# ((Blog)Container.DataItem).PageUrl %>">
            <%#((Blog)Container.DataItem).Title%>
          </a>
        </h3>

        <p>
            <%#((Blog)Container.DataItem).Content%>
        </p>
        <br />
        <sf:TagsList ID="TagsList1" runat="server" Tags="<%# ((Blog)Container.DataItem).Tags %>" />
        
        <%--<sf:SocialButtons ID="SocialButtons1" runat="server" PageUrl="<%# ((Blog)Container.DataItem).PageUrl %>" />--%>

        <p>
          <b>
            <a href="<%# ((Blog)Container.DataItem).Member.MemberUrl %>">
              <%# ((Blog)Container.DataItem).Member.LoginName %>
            </a>
          </b>
        </p>
        

    </ItemTemplate>
    
    <EmptyDataTemplate>
        <p>No blogs have been created yet.</p>
    </EmptyDataTemplate>

</asp:ListView>

<asp:DataPager runat="server" ID="ItemDataPager" PageSize="5" PagedControlID="lvBlogs" QueryStringField="p">
    <Fields>
      <asp:NumericPagerField />
    </Fields>
</asp:DataPager>